import { get,post } from "../utils/request/request";
import apiUrl from "../utils/urls";
import { envConfig } from "../utils/config/index";

export async function getCompanyInfo() {
  return get(
    apiUrl.companyConfigUrl,
    { companyId: envConfig.companyId },
    {
      showLoading: false,
      withToken: false,
    }
  );
}
// 获取默认名片
export async function getDetaultCardId(params) {
  return get(apiUrl.getDefaultCardUrl, {
    companyId: envConfig.companyId,
    ...params,
  });
}
// 获取名片详情
export async function getCardDetail(params) {
  return get(apiUrl.cardDetailbase, {
    companyId: envConfig.companyId,
    ...params,
  });
}
// 获取名片页名片详情
export async function getCardMainDetail(params) {
  return post(apiUrl.cardMainUrl, {
    companyId: envConfig.companyId,
    ...params,
  });
}
// 获取手机号授权状态
export async function getAuthorizeStatus() {
  return post(apiUrl.authorizeStatusUrl)
}

// 添加好友关系
export async function addRelationship(params) {
  return post(apiUrl.addRelationshipUrl,params)
}
// 获取身份认证
export async function getVerifiedStatus(params) {
  return get(apiUrl.verifiedStatusUrl,params)
}
// 获取动态角标数字
export async function getDynamicBadge(params) {
  return post(apiUrl.dynamicBadgeUrl,params)
}

// 发送上报数据
export async function sendBrowsEvent(params) {
  return post(apiUrl.browsEventReportUrl,params)
}

// 获取宣传册
export async function getManualList(params) {
  return post(apiUrl.getRecommendListUrl,params)
}
// 获取banner
export async function getDynamicBanner(params) {
  return post(apiUrl.getDynamicBannerUrl,params)
}
// 获取自定义模块
export async function getCustomizeModule(params) {
  return post(apiUrl.getCustomizeModuleUrl,params)
}
// 获取推荐活动
export async function getRecommendActivityList(params) {
  return post(apiUrl.getRecommendActivityListUrl,params)
}
// 获取宣传册数据
export async function getCatalogContent(params) {
  return get(apiUrl.getCatalogContentUrl,params)
}

// 获取宣传册数据
export async function getMyCompanyInfo(params) {
  return get(apiUrl.myCompanyInfoUrl,params)
}
